package cn.beyond.vehicleManagement.service;

import cn.beyond.vehicleManagement.dao.DepartmentDao;
import cn.beyond.vehicleManagement.pojo.SysDepartment;

import java.util.List;
import java.util.Map;

public class DepartmentService {
    DepartmentDao dao=new DepartmentDao();

    /**
     * 添加部门
     * @return
     */
    public int addDepartment(SysDepartment sysDepartment){
        return    dao.addDepartment(sysDepartment);
    }

    /**
     * 删除部门
     * @param obj
     * @param column
     * @return
     */
    public int deleteDepartment(Object obj,String column){
        return dao.deleteDepartment(obj,column);
    }

    /**
     * 修改部门
     * @return
     */
    public int update(SysDepartment sysDepartment){
        return  dao.update(sysDepartment);
    }

    /**
     * 查询结果返回单条记录
     * @param selectmap
     * @return
     */
    public SysDepartment selectUserByOne(SysDepartment sysDepartment, Map<String, Object> selectmap){
        return dao.selectUserByOne(sysDepartment,selectmap);
    }

    /**
     * 查询结果返回多条记录

     * @param selectmap
     * @return
     */
    public List<SysDepartment> selectUserByCondition(SysDepartment sysDepartment,
                                                     Map<String, Object> selectmap){
        return  dao.selectUserByCondition(sysDepartment,selectmap);
    }

}
